package com.shopping.system.feign;

import com.shopping.common.entity.Good;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.annotation.PostConstruct;
import java.util.List;

@FeignClient(contextId = "esAddGoodFeign",name = "es",path = "/es")
public interface EsFeign {

    /**
     * 同步商品信息到es
     * @param list
     * @return
     */
    @PostMapping("/addGoodToEs")
    int addGoodToEs(@RequestBody List<Good> list);
}
